﻿using Acme.BookStore.COM;
using AutoMapper.Internal.Mappers;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Users;

namespace Acme.BookStore.Com
{
    public class MenuListAppService : CrudAppService<MuenList, MuenListDto, Guid, MuenListDto, MuenListDto>, IMenuListAppService
    {
        //public readonly IRepository<MuenList, Guid> _MenuListRepository;

        public MenuListAppService(IRepository<MuenList, Guid> repository) :base(repository)
        {
            //_MenuListRepository = repository;
        }

    

        /// <summary>
        /// 插入返回
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        //public  async Task<OutputBaseDto<MuenListDto>> CreateAsync(MuenListDto input)
        //{
        //    var entity = ObjectMapper.Map<MuenListDto, MuenList>(input);
          
        //    await _MenuListRepository.InsertAsync(entity, autoSave: true);

        //    OutputBaseDto<MuenListDto> output = new OutputBaseDto<MuenListDto>();
        //    output.Data = ObjectMapper.Map<MuenList, MuenListDto>(entity);
        //    return output;
        //}
        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        //public async Task<OutputBaseDto<MuenListDto>> GetMenuList(SelectMenuDto input) {
        //    var list = new MuenList();
        //    ////List<MuenList> output = new List<MuenList>();
        //    //if (!string.IsNullOrWhiteSpace(input.Title)) {
        //    //    list =await _MenuListRepository.ge(x => x.Title == input.Title);
        //    //    //output.Add(list);
        //    //};
        //    //if (!string.IsNullOrWhiteSpace(input.Key))
        //    //{
        //    //    output = _MenuListRepository.GetAsync(x => x.Key == input.Key);
        //    //};
        //    OutputBaseDto<MuenListDto> outNew = new OutputBaseDto<MuenListDto>();
        //    outNew.Data = ObjectMapper.Map<MuenList, MuenListDto>(list);
        //    return outNew;
        //}
    }
}
